home *** CD-ROM | disk | FTP | other *** search
Wrap
mmmmeeeemmmmccccnnnnttttllll((((2222)))) mmmmeeeemmmmccccnnnnttttllll((((2222)))) NNNNAAAAMMMMEEEE _mmmm_eeee_mmmm_cccc_nnnn_tttt_llll - memory management control SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>> _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_mmmm_mmmm_aaaa_nnnn_...._hhhh_>>>> _iiii_nnnn_tttt _mmmm_eeee_mmmm_cccc_nnnn_tttt_llll_((((_vvvv_oooo_iiii_dddd _****_a_d_d_r_,,,, _ssss_iiii_zzzz_eeee______tttt _l_e_n_,,,, _iiii_nnnn_tttt _c_m_d_,,,, _vvvv_oooo_iiii_dddd _****_a_r_g_,,,, _iiii_nnnn_tttt _a_t_t_r_,,,, _iiii_nnnn_tttt _m_a_s_k_))))_;;;; DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN _N_O_T_E: _t_h_i_s _f_u_n_c_t_i_o_n _i_s _n_o_t _c_u_r_r_e_n_t_l_y _i_m_p_l_e_m_e_n_t_e_d _i_n _I_R_I_X. _A_n_y _c_a_l_l_s _t_o _t_h_i_s _f_u_n_c_t_i_o_n _w_i_l_l _r_e_t_u_r_n _E_N_O_S_Y_S. The function _mmmm_eeee_mmmm_cccc_nnnn_tttt_llll allows the calling process to apply a variety of control operations over the address space identified by the mappings established for the address range [_a_d_d_r, _a_d_d_r + _l_e_n). _a_d_d_r must be a multiple of the pagesize as returned by _ssss_yyyy_ssss_cccc_oooo_nnnn_ffff(3C). The scope of the control operations can be further defined with additional selection criteria (in the form of attributes) according to the bit pattern contained in _a_t_t_r. The following attributes specify page mapping selection criteria: _SSSS_HHHH_AAAA_RRRR_EEEE_DDDD Page is mapped shared. _PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE Page is mapped private. The following attributes specify page protection selection criteria: _PPPP_RRRR_OOOO_TTTT______RRRR_EEEE_AAAA_DDDD Page can be read. _PPPP_RRRR_OOOO_TTTT______WWWW_RRRR_IIII_TTTT_EEEE Page can be written. _PPPP_RRRR_OOOO_TTTT______EEEE_XXXX_EEEE_CCCC Page can be executed. The selection criteria are constructed by an OR of the attribute bits and must match exactly. In addition, the following criteria may be specified: _PPPP_RRRR_OOOO_CCCC______TTTT_EEEE_XXXX_TTTT process text _PPPP_RRRR_OOOO_CCCC______DDDD_AAAA_TTTT_AAAA process data where _PPPP_RRRR_OOOO_CCCC______TTTT_EEEE_XXXX_TTTT specifies all privately mapped segments with read and execute permission, and _PPPP_RRRR_OOOO_CCCC______DDDD_AAAA_TTTT_AAAA specifies all privately mapped segments with write permission. Selection criteria can be used to describe various abstract memory objects within the address space on which to operate. If an operation shall not be constrained by the selection criteria, _a_t_t_r must have the value _0000. The operation to be performed is identified by the argument _c_m_d. The symbolic names for the operations are defined in _<<<<_ssss_yyyy_ssss_////_mmmm_mmmm_aaaa_nnnn_...._hhhh_>>>> as follows: PPPPaaaaggggeeee 1111 mmmmeeeemmmmccccnnnnttttllll((((2222)))) mmmmeeeemmmmccccnnnnttttllll((((2222)))) _MMMM_CCCC______LLLL_OOOO_CCCC_KKKK Lock in memory all pages in the range with attributes _a_t_t_r. A given page may be locked multiple times through different mappings; however, within a given mapping, page locks do not nest. Multiple lock operations on the same address in the same process will all be removed with a single unlock operation. A page locked in one process and mapped in another (or visible through a different mapping in the locking process) is locked in memory as long as the locking process does neither an implicit nor explicit unlock operation. If a locked mapping is removed, or a page is deleted through file removal or truncation, an unlock operation is implicitly performed. If a writable _MMMM_AAAA_PPPP______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE page in the address range is changed, the lock will be transferred to the private page. At present _a_r_g is unused, but must be _0000 to ensure compatibility with potential future enhancements. _MMMM_CCCC______LLLL_OOOO_CCCC_KKKK_AAAA_SSSS Lock in memory all pages mapped by the address space with attributes _a_t_t_r. At present _a_d_d_r and _l_e_n are unused, but must be _NNNN_UUUU_LLLL_LLLL and _0000 respectively, to ensure compatibility with potential future enhancements. _a_r_g is a bit pattern built from the flags: _MMMM_CCCC_LLLL______CCCC_UUUU_RRRR_RRRR_EEEE_NNNN_TTTT Lock current mappings _MMMM_CCCC_LLLL______FFFF_UUUU_TTTT_UUUU_RRRR_EEEE Lock future mappings The value of _a_r_g determines whether the pages to be locked are those currently mapped by the address space, those that will be mapped in the future, or both. If _MMMM_CCCC_LLLL______FFFF_UUUU_TTTT_UUUU_RRRR_EEEE is specified, then all mappings subsequently added to the address space will be locked, provided sufficient memory is available. _MMMM_CCCC______SSSS_YYYY_NNNN_CCCC Write to their backing storage locations all modified pages in the range with attributes _a_t_t_r. Optionally, invalidate cache copies. The backing storage for a modified _MMMM_AAAA_PPPP______SSSS_HHHH_AAAA_RRRR_EEEE_DDDD mapping is the file the page is mapped to; the backing storage for a modified _MMMM_AAAA_PPPP______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE mapping is its swap area. _a_r_g is a bit pattern built from the flags used to control the behavior of the operation: _MMMM_SSSS______AAAA_SSSS_YYYY_NNNN_CCCC perform asynchronous writes _MMMM_SSSS______SSSS_YYYY_NNNN_CCCC perform synchronous writes _MMMM_SSSS______IIII_NNNN_VVVV_AAAA_LLLL_IIII_DDDD_AAAA_TTTT_EEEE invalidate mappings _MMMM_SSSS______AAAA_SSSS_YYYY_NNNN_CCCC returns immediately once all write operations are scheduled; with _MMMM_SSSS______SSSS_YYYY_NNNN_CCCC the system call will not return until all write operations are completed. _MMMM_SSSS______IIII_NNNN_VVVV_AAAA_LLLL_IIII_DDDD_AAAA_TTTT_EEEE invalidates all cached copies of data in memory, so that further references to the pages will be obtained by the system from their backing storage locations. This operation should be used by applications that require a memory object to be in a known state. PPPPaaaaggggeeee 2222 mmmmeeeemmmmccccnnnnttttllll((((2222)))) mmmmeeeemmmmccccnnnnttttllll((((2222)))) _MMMM_CCCC______UUUU_NNNN_LLLL_OOOO_CCCC_KKKK Unlock all pages in the range with attributes _a_t_t_r. At present _a_r_g is unused, but must be _0000 to ensure compatibility with potential future enhancements. _MMMM_CCCC______UUUU_NNNN_LLLL_OOOO_CCCC_KKKK_AAAA_SSSS Remove address space memory locks, and locks on all pages in the address space with attributes _a_t_t_r. At present _a_d_d_r, _l_e_n, and _a_r_g are unused, but must be _NNNN_UUUU_LLLL_LLLL, _0000 and _0000 respectively, to ensure compatibility with potential future enhancements. The _m_a_s_k argument must be zero; it is reserved for future use. Locks established with the lock operations are not inherited by a child process after _ffff_oooo_rrrr_kkkk. _mmmm_eeee_mmmm_cccc_nnnn_tttt_llll fails if it attempts to lock more memory than a system-specific limit. Due to the potential impact on system resources, all operations, with the exception of _MMMM_CCCC______SSSS_YYYY_NNNN_CCCC, are restricted to processes with appropriate privileges (_PPPP______PPPP_LLLL_OOOO_CCCC_KKKK). The _mmmm_eeee_mmmm_cccc_nnnn_tttt_llll function subsumes the operations of _pppp_llll_oooo_cccc_kkkk and _mmmm_cccc_tttt_llll. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE On success, _mmmm_eeee_mmmm_cccc_nnnn_tttt_llll returns _0000; on failure, _mmmm_eeee_mmmm_cccc_nnnn_tttt_llll returns _----_1111 and sets _eeee_rrrr_rrrr_nnnn_oooo to indicate an error. EEEERRRRRRRROOOORRRRSSSS Under the following conditions, the function _mmmm_eeee_mmmm_cccc_nnnn_tttt_llll fails and sets _eeee_rrrr_rrrr_nnnn_oooo to: _EEEE_AAAA_GGGG_AAAA_IIII_NNNN Some or all of the memory identified by the operation could not be locked when _MMMM_CCCC______LLLL_OOOO_CCCC_KKKK or _MMMM_CCCC______LLLL_OOOO_CCCC_KKKK_AAAA_SSSS is specified. _EEEE_BBBB_UUUU_SSSS_YYYY Some or all the addresses in the range [_a_d_d_r, _a_d_d_r + _l_e_n) are locked and _MMMM_CCCC______SSSS_YYYY_NNNN_CCCC with _MMMM_SSSS______IIII_NNNN_VVVV_AAAA_LLLL_IIII_DDDD_AAAA_TTTT_EEEE option is specified. _EEEE_FFFF_AAAA_UUUU_LLLL_TTTT The page to be locked has been aborted (e.g. by a file truncate operation), or pages following the end of an object are not allocated. _EEEE_IIII_NNNN_VVVV_AAAA_LLLL _a_d_d_r is not a multiple of the page size as returned by _ssss_yyyy_ssss_cccc_oooo_nnnn_ffff. _EEEE_IIII_NNNN_VVVV_AAAA_LLLL _a_d_d_r and/or _l_e_n do not have the value _0000 when _MMMM_CCCC______LLLL_OOOO_CCCC_KKKK_AAAA_SSSS or _MMMM_CCCC______UUUU_NNNN_LLLL_OOOO_CCCC_KKKK_AAAA_SSSS is specified. _EEEE_IIII_NNNN_VVVV_AAAA_LLLL _a_r_g is not valid for the function specified. _EEEE_IIII_NNNN_VVVV_AAAA_LLLL Invalid selection criteria are specified in _a_t_t_r. PPPPaaaaggggeeee 3333 mmmmeeeemmmmccccnnnnttttllll((((2222)))) mmmmeeeemmmmccccnnnnttttllll((((2222)))) _EEEE_IIII_OOOO An I/O error occurred when attempting to read the page from a device or a network. _EEEE_NNNN_OOOO_MMMM_EEEE_MMMM The argument _l_e_n has a value less than or equal to _0000. _EEEE_NNNN_OOOO_MMMM_EEEE_MMMM Some or all the addresses in the range [_a_d_d_r, _a_d_d_r + _l_e_n) are invalid for the address space of the process or pages not mapped are specified. _EEEE_PPPP_EEEE_RRRR_MMMM The process does not have appropriate privilege (_PPPP______PPPP_LLLL_OOOO_CCCC_KKKK) and one of _MMMM_CCCC______LLLL_OOOO_CCCC_KKKK, _MMMM_CCCC______LLLL_OOOO_CCCC_KKKK_AAAA_SSSS, _MMMM_CCCC______UUUU_NNNN_LLLL_OOOO_CCCC_KKKK, _MMMM_CCCC______UUUU_NNNN_LLLL_OOOO_CCCC_KKKK_AAAA_SSSS was specified. SSSSEEEEEEEE AAAALLLLSSSSOOOO mmap(2), mprotect(2), plock(2), mlock(3C), mlockall(3C), msync(3C), sysconf(3C) PPPPaaaaggggeeee 4444